package demo;
//测试多态的运用Test类
public class Test {
    public static void drawShape(){
        Circle circle = new Circle();
        Rect rect = new Rect();
        Flower flower = new Flower();

        Shape[] shapes = {flower, circle, rect};
        for (Shape shape:shapes) {
            shape.draw();
        }
    }

    public static void main(String[] args) {
        drawShape();
    }
}
